package org.apache.flink.runtime.cleanup;

import org.apache.flink.api.common.ConsumerID;

import java.util.concurrent.CompletableFuture;

/** {@code ResourceCleaner} executes instances on the given {@code JobID}. */
@FunctionalInterface
public interface ResourceCleaner {

    /**
     * Cleans job-related data from resources asynchronously.
     *
     * @param jobId The {@link ConsumerID} referring to the job for which the data shall be cleaned up.
     * @return the cleanup result future.
     */
    CompletableFuture<Void> cleanupAsync(ConsumerID jobId);
}
